<!-- 调研明细详情弹窗-->
<template>
  <el-dialog :visible="visible" @close="$emit('close')" title="调研明细-详情" width="70%">
    <jdf-form-collapse :list.sync="collapseList" ref="formCollapse">
      <template #baseInfo>
        <jdf-increased-form
          ref="increasedRef"
          :configs="configs"
          :data="formData"
          :formAttrs="formAttrs"
          :all-fields-readonly="allFieldsReadonly"
        ></jdf-increased-form>
      </template>
    </jdf-form-collapse>
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="$emit('close')">关 闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    // 表单数据
    formData: {
      type: Object,
      default: () => {},
    },
    // 全表单字段是否可编辑
    allFieldsReadonly: {
      type: Boolean,
      default: false
    },
  },
  data() {
    return {
      // 表单展示配置
      configs: [
        [
          { formElName: '发起人', formElCode: 'normativeType', colSpan: 8 },
          { formElName: '发起时间', formElCode: 'normativeType', colSpan: 8 },
          { formElName: '台账编码', formElCode: 'normativeType', colSpan: 8 },
        ],
        [
          { formElName: '调研日期', formElCode: 'researchStartDate', colSpan: 8 },
          { formElName: '带队领导', formElCode: 'leadingUserName', colSpan: 8 },
          { formElName: '牵头部门', formElCode: 'leadingDepartmentIds', colSpan: 8 },
        ],
        [
          { formElName: '调研类型', formElCode: 'normativeType', colSpan: 8 },
          { formElName: '调研对象', formElCode: 'researchUnitName', colSpan: 8 },
          { formElName: '连带性规范性动作类别', formElCode: 'normativeType', colSpan: 8 },
        ],
        [
          { formElName: '被调研单位陪同人员', formElCode: 'normativeType', colSpan: 8 },
          { formElName: '调研地市', formElCode: 'normativeType', colSpan: 8 },
          { formElName: '调研地点', formElCode: 'normativeType', colSpan: 8 },
        ],
        [{ formElName: '带回解决问题数', formElCode: 'detectProblemNumber', colSpan: 24 }],
        [
          { formElName: '解决问题数', formElCode: 'resolvedProblemNumber', colSpan: 8 },
          { formElName: '台账状态', formElCode: 'normativeType', colSpan: 8 },
          { formElName: '备注', formElCode: 'normativeType', colSpan: 8 },
        ],
        [
          { formElName: '关联调研工作开展情况流程', formElCode: 'normativeType', colSpan: 8 },
          { formElName: '关联调研工作安排流程', formElCode: 'normativeType', colSpan: 8 },
          { formElName: '关联问题反馈流程', formElCode: 'normativeType', colSpan: 8 },
        ],
      ],
      // 表单属性
      formAttrs: {
        'show-message': false,
        'hide-required-asterisk': false,
      },
      // 折叠面板列表
      collapseList: [
        { slot: 'baseInfo', title: '基本信息' },
      ]
    };
  },
};
</script>
